﻿<?phpclass CommentActionController extends ActionController {    public function run() {        $articleMapper = new ArticleMapper();        $userMapper = new UserMapper();                $art = $articleMapper->getArticleByID($this->params['artID'], 1);        $userMapper->getFullUserName($art);        $userMapper->getKarma($art);                $this->view->article = $art;                $commentMapper = new CommentMapper();        if ($this->isPost()) {            $comment = new Comment($this->getPost());            $commentMapper->addNewComment($comment, $this->user->id);        }                $comments = $commentMapper->getCommentsByArtID($art->id);        $userMapper->getFullUserName($comments);                        $this->view->comments = $comments;        $this->view->user = $this->user;        $this->view->setRenderTemplate('comments.phtml');    }}?>